import ErrorList from './ErrorList';
import Form from './Form';
import FormItem from './FormItem';
import List from './List';
import useForm from './hooks/useForm';
import './style/index.less';

type FormType = typeof Form;
interface CombineFormType extends FormType {
  FormItem: typeof FormItem;
  List: typeof List;
  useForm: typeof useForm;
  ErrorList: typeof ErrorList;
}

const CombineForm = Form as CombineFormType;
CombineForm.FormItem = FormItem;
CombineForm.List = List;
CombineForm.useForm = useForm;
CombineForm.ErrorList = ErrorList;

export default CombineForm;
export { ErrorList, FormItem, List, useForm };

export type { FormInstance, YmFormProps } from './interface';
export type { ValidateMessages } from './interface/ValidateType';
